/* prhw.t  prh_hist Purchase Order Receipt History Write Trigger              */
/*Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                         */
/*All rights reserved worldwide.  This is an unpublished work.                */
/* $Revision: 1.6 $                                                           */
/*V8:ConvertMode=NoConvert                                                    */
/******************************************************************************/
/* Revision: 1.3        BY: Jean Miller          DATE: 06/06/02  ECO: *P07T*  */
/* Revision: 1.5        BY: Jean Miller          DATE: 06/13/02  ECO: *P082*  */
/* $Revision: 1.6 $     BY: Jean Miller          DATE: 08/01/02  ECO: *P0CL*  */
/******************************************************************************/

TRIGGER PROCEDURE FOR WRITE OF prh_hist OLD BUFFER old_prh_hist.

{mfdeclre.i}

define variable l-return as character no-undo.

/* Track Capacity Units */
if new prh_hist and
  (old_prh_hist.prh_nbr      <> prh_hist.prh_nbr      or
   old_prh_hist.prh_receiver <> prh_hist.prh_receiver or
   old_prh_hist.prh_line     <> prh_hist.prh_line)
then do:

   if prh_hist.prh_qty_ord < 0 then
      l-return = "RETURN".
   else
      l-return = "".

   {lvucap.i &TABLE="prh_hist" &QUALIFIER="l-return"}

end.
